package com.yrh.service.impl;

import com.yrh.bean.TAddress;
import com.yrh.dao.TAddressDao;
import com.yrh.dao.impl.TAddressDaoImpl;
import com.yrh.service.TAddressService;

import java.util.List;
/*地址逻辑层接口实现类*/
public class TAddressServiceImpl implements TAddressService {
    //创建数据层对象
    private TAddressDao dao=new TAddressDaoImpl();
    @Override
    public List<TAddress> allAddress(TAddress tAddress) {
        return dao.allAddress(tAddress);
    }
    //修改默认地址
    @Override
    public int updateDefault(TAddress tAddress) {
        return dao.updateDefault(tAddress) ;
    }
    /*删除地址*/
    @Override
    public int delAddress(TAddress tAddress) {
        return dao.delAddress(tAddress);
    }
/*修改地址信息*/
    @Override
    public int updateAds(TAddress tAddress) {
        return dao.updateAds(tAddress);
    }
/*添加地址信息*/
    @Override
    public int addAddress(TAddress tAddress) {
        return dao.addAddress(tAddress);
    }
}
